<?php
if(isset($clientinfo)==false || isset($forfaitlist)==FALSE)
{
	header("Location: index.php?gclient/listclient");
} else 
{
//print_r($clientinfo);
//echo "------------";
//print_r($forfaitlist);
//print_r($username);

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="css/reset.css" />
<link rel="stylesheet" href="css/text.css" />
<link rel="stylesheet" href="css/960_24_col.css" />
 <link rel="stylesheet" href="css/jquery-ui-1.8.21.custom.css" />
 <link rel="stylesheet" href="css/style.css" />
 <link rel="stylesheet" href="css/faary.css" type="text/css" />
 <script type="text/javascript" src="js/jquery-1.7.2.min.js"></script>
 <script type="text/javascript" src="js/jquery-ui-1.8.21.custom.min.js"></script>
<script type="text/javascript" src="js/scripts.js"></script>
<script type="text/javascript" src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/jquery.validate.js"></script>
<script>
	$(function(){

		$( "#Date" ).datepicker({ dateFormat: 'yy-mm-dd' });
	
$(".formbus").validate({
		submitHandler: function(form){ form.submit() },
		 onfocusout: true,

		rules: {
			
			address: {
				required: true,
				},
		
			
			tele: {
     			 required: true,
   			},

			city:{
     			 required: true,
   			},
		companyname:{
			 required: true,
			},

				
			
		},
		
		messages: {
			address: " Nom complet",
			tele: "xxx-xxx-xxxx",
			city: " city complet",
			companyname: " companyname complet",
		}
	});
			
	})
</script>
</head>

<body>
	<script type="text/javascript">
<!--
	function isEmailValid(email){
		var e = new RegExp(/^(("[\w-\s]+")|([\w-]+(?:\.[\w-]+)*)|("[\w-\s]+")([\w-]+(?:\.[\w-]+)*))(@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$)|(@\[?((25[0-5]\.|2[0-4][0-9]\.|1[0-9]{2}\.|[0-9]{1,2}\.))((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\.){2}(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[0-9]{1,2})\]?$)/i);
		return e.test(email);
	}
	
-->
</script>
	<div class="principal container_24">
		
		<!--logo-->
		<div class="logo grid_24">
			<div class="grid_1">&nbsp;</div>
			<div class="grid_4 logoimage">LOGO</div>
			<div class="logout grid_5"><a href="index.php?loginprocess/loginout"><img src="img/bt_logout.jpg"/></a></div>
		</div><!-- end logo-->
		
		<!--menupricipal-->
		<div class="menuprincipal grid_24">
			<a  style="color" href="index.php?gclient/listclient" >Allez à la List des Clients</a>
		</div>
		<!-- end menupricipal-->
				
			<div class="descprincipal grid_22">
				description
			</div>
			
			<div class="grid_24 listcontent">
				<h1>Booking Virtuo</h1>
				<div class="grid_22 list">
<form method="post" action="index.php?gclient/addappoitment"  class="iform grid_18 formbus"  onSubmit="return false">
<input type="hidden" name="idcase" value="<?php echo $clientinfo[0]["idcase"];?>"/>
<input type="hidden" name="idclients" value="<?php echo $clientinfo[0]["idclients"];?>"/>
<div id="imessageOK">Thank you! Message Sent!</div>
<div id="imessageERROR">ERROR: Message Not Sent!</div>
<ul class="">
<li class="iheader">Booking Your Show</li>
<li><label for="TourName">Adresse</label><input class="itext" type="text" name="address" id="address" value="<?php echo $clientinfo[0]["address"];?>" /></li>
<li><label for="TourCode">*Téléphone</label><input class="itext" type="text" name="tele" id="tele" value="<?php echo $clientinfo[0]["tele"];?>" /></li>
<li><label for="TourCode">*Ville</label><input class="itext" type="text" name="city" id="city" value="<?php echo $clientinfo[0]["city"];?>" /></li>
<li><label for="TourCode">*Nom de l'entreprise</label><input class="itext" type="text" name="companyname" id="companyname"  value="<?php echo $clientinfo[0]["companyname"];?>"/></li>
<li><label for="Date">*Date</label><input class="itext" type="text" name="Date" id="Date" /></li>
<li><label for="numberpeople">Heure du Photoshoot (début) *</label><select class="iselect" name="strattime" id="strattime">
<option value="9">9:00</option>
<option value="11">11:00</option>
<option value="13">13:00</option>
<option value="15">15:00</option>
<option value="17">17:00</option>
<option value="19">19:00</option>
</select></li>
<li><label for="numberpeople">Heure du Photoshoot (Fin) *</label><select class="iselect" name="endtime" id="endtime">
<option value="11">11:00</option>
<option value="13">13:00</option>
<option value="15">15:00</option>
<option value="17">17:00</option>
<option value="19">19:00</option>
<option value="21">21:00</option>
</select></li>
<li><label for="numberpeople">Forfait: *</label><select class="iselect" name="forfait" id="forfait">
<?php foreach ($forfaitlist as $fl){?>
<option value="<?php echo $fl["idforfait"];?>"><?php echo $fl["name"]."-- $".$fl["prix"] ;?></option>
<?php }?>
</select></li>
<li><label for="Description">*Description</label><textarea class="itextarea" name="Description" id="Description"></textarea></li>
<li><label for="TourName">Prénom et nom du décideur *</label><input class="itext" type="text" name="decider" id="decider"  value="<?php echo $clientinfo[0]["contactperson"];?>"/></li>
 <!--
 <li><label for="TourName">de téléphone * Urgence</label><input class="itext" type="text" name="d_tele" id="TourName" /></li>
-->
<li><label for="TourName">Email</label><input class="itext" type="text" name="d_email" id="d_email"  value="<?php echo $clientinfo[0]["contactpersonemail"];?> "/></li>
<li><label for="TourName">Représentant</label><input class="itext" type="text" name="sales" id="sales"  value="<?php  echo $username;?>"/></li>
<li><label>&nbsp;</label><input type="submit" class="ibutton"  name="SendaMessage" id="SendaMessage" value="Send a Message!" /></li>
</ul></form>
				</div>
			</div>
		
	</div><!--end principal-->
</body>
</html>
<?php }?>